import 'package:ceramics/extensions/ab_widget_extensions.dart';
import 'package:ceramics/model/ab_singleton.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class ABCoinWidget extends StatelessWidget {
  const ABCoinWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
        height: 152,
        decoration: const BoxDecoration(
          image: DecorationImage(
            image: AssetImage("images/ceramics_29.webp"),
            fit: BoxFit.cover,
          ),
        ),
        child: Column(
          children: [
            60.toVerticalBox,
            Row(children: [
              const Spacer(),
              Column(
                children: [
                  Obx(() {
                    return Text(
                        (ABSingleton.user?.availableCoins ?? 0).toString(),
                        style: const TextStyle(
                            fontWeight: FontWeight.w500,
                            fontSize: 40,
                            color: Color(0xFFE4A72D)));
                  }),
                  Text('my coins'.tr,
                      style: const TextStyle(
                          color: Color(0xFFE4A72D), fontSize: 15)),
                ],
              ),
              80.toHorizontalBox,
            ]),
          ],
        ));
  }
}
